<?php
namespace app\common\validate;

use think\Validate;

class Account extends Validate
{
    protected $rule = [
        'mobile'  =>  'require|token|regex:/^1[3-9]\d{9}$/',
    ];

    protected $message  =   [
        'mobile.require' => '手机号为必填',
        'mobile.regex' => '非法的手机号',
    ];

    protected $scene = [
        'insert'  =>  ['mobile'],
    ];
}
